﻿using ExtendPropertyLib;

namespace ExORMDesginer.Models
{
    /// <summary>
    /// SQL语句参数信息
    /// </summary>
    public class ParameterInfo : BusinessInfoBase<ParameterInfo>
    {
        public static ExtendProperty NameProperty = RegisterProperty(v => v.Name);
        /// <summary>
        /// 参数名称
        /// </summary>
        public string Name { set { SetValue(NameProperty, value); } get { return (string)GetValue(NameProperty); } }

        public static ExtendProperty ParameterTypeProperty = RegisterProperty(v => v.ParameterType);
        /// <summary>
        /// 参数类型
        /// </summary>
        public KeyValueObject<string,string> ParameterType { set { SetValue(ParameterTypeProperty, value); } get { return (KeyValueObject<string,string>)GetValue(ParameterTypeProperty); } }

        public static ExtendProperty ParameterLengthProperty = RegisterProperty(v => v.ParameterLength);
        /// <summary>
        /// 参数类型长度
        /// </summary>
        public int ParameterLength { set { SetValue(ParameterLengthProperty, value); } get { return (int)GetValue(ParameterLengthProperty); } }

        public static ExtendProperty IsOptionProperty = RegisterProperty(v => v.IsOption);
        /// <summary>
        /// 是否是可选项
        /// </summary>
        public bool IsOption { set { SetValue(IsOptionProperty, value); } get { return (bool)GetValue(IsOptionProperty); } }


        public static ExtendProperty ValueProperty = RegisterProperty(v => v.Value);
        /// <summary>
        /// 参数值
        /// </summary>
        public string Value { set { SetValue(ValueProperty, value); } get { return (string)GetValue(ValueProperty); } }

        
        public static ExtendProperty MemoProperty = RegisterProperty(v => v.Memo);
        /// <summary>
        /// 备注
        /// </summary>
        public string Memo { set { SetValue(MemoProperty, value); } get { return (string)GetValue(MemoProperty); } }


        
        public static ExtendProperty ParameterContentProperty = RegisterProperty(v => v.ParameterContent);
        /// <summary>
        /// 参数正文
        /// </summary>
        public string ParameterContent { set { SetValue(ParameterContentProperty, value); } get { return (string)GetValue(ParameterContentProperty); } }

    }
}
